﻿using System;

namespace YArchitech.Revit.MEP.Opening
{
	public class SteelDrivePipeData : IComparable
	{
		public SteelDrivePipeData()
		{
			this.MetalPipeDn = "";
			this.PlasticPipeDn = "";
			this.DrivePipeDn = "0";
		}

		public string MetalPipeDn { get; set; }

		public string PlasticPipeDn { get; set; }

		public string DrivePipeDn { get; set; }

		int IComparable.CompareTo(object obj)
		{
			try
			{
				SteelDrivePipeData steelDrivePipeData = (SteelDrivePipeData)obj;
				double num = string.IsNullOrEmpty(this.DrivePipeDn) ? 0.0 : Convert.ToDouble(this.DrivePipeDn);
				double num2 = string.IsNullOrEmpty(steelDrivePipeData.DrivePipeDn) ? 0.0 : Convert.ToDouble(steelDrivePipeData.DrivePipeDn);
				return (num <= num2) ? -1 : 1;
			}
			catch
			{
			}
			return 0;
		}
	}
}
